<!-- begin page_toolbar template -->
<div class="toolbar padding16w margin14h">
  <div style="display: flex; flex-direction: row;">
    {%- if page.date %}
    <!-- main page -->
    <a href="{{ page.lang | default: 'ru' | append: '/' | relative_url }}">
      <b>{% if page.lang != site.lang %}MAIN{% else %}ГЛАВНАЯ{% endif %}</b>
    </a>
    {%- else %}
    <!-- home page -->
    <a href="{{ site.homepage_url }}">
      <b>{{ site.homepage_name }}</b>
    </a>
    {%- endif %}
    <!-- divider -->
    <span style="flex: 1;"></span>
    {%- if page.url_translated %}
    <!-- switch language -->
    <a href="{{ page.url_translated | relative_url }}" style="margin: 0 17px;">
      <b>{{ page.lang | default: 'ru' | upcase }}</b>
    </a>
    {%- endif %}
    {%- if site.color_tomato_baseurl %}
    <!-- color tomato -->
    <a href="{{ site.color_tomato_baseurl | append: page.canonical_url }}" style="height: 30px; margin: 2px 0 0 16px;">
      <img src="/img/typewriter.svg" width="30" height="30" alt="typewriter">
    </a>
    {%- endif %}
  </div>
  <hr>
</div>
<!-- end page_toolbar template -->
